num = 3
def fun():
    num = 5
    print('0000002:', num)
fun()
print('0000:', num)

num = 5
def fun ():
    global num
    num += 1
    print('3333:', num)
    fun()
    print('444:',num)

def outer():
    num = 1
    def inner():
        nonlocal num
        num = 2
        print('55556:',unm)
        inner()
        print('000222:',num)
        outer()

    stu = [{'num':'201801','name':'王5','score': 89},
           {'num':'201802','name':'刘1','score': 95},
           {'num':'201803','name':'刘2','score'85}]
    stu.sort(key=lambda x: x['score'])
    for s in stu:
    print('学号：',s['num'],'姓名:',s['name'],'成绩：',s['score'])



